#!/bin/bash

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

# plugin folder inside template must be the FIRST one to add.
# plugin folder in current repo will be inserted before it. So in case of
# plugin with same name, the one in current repo will be used.
PYPATH=$DIR"/.plugins"

CWD="$( git rev-parse --show-toplevel )"
if [[ -d "$CWD/.plugins" ]]; then
    PYPATH="$CWD/.plugins:"$PYPATH
fi

# start python script.
PYTHONPATH="$PYPATH" python $DIR/tpl.py $@

